package Mydate.itheima.Demo01.demo01;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class DateTest01 {
    public static void main(String[] args) throws ParseException {
        Timemethod();
        Date date02 = new Date(0L);
        date02.setTime(1000L*3600);
        System.out.println("date02"+date02);
        SimpleDateFormat  sdf = new SimpleDateFormat("yyyy年MM月dd日  HH:mm:ss");
        String time = sdf.format(date02);
        System.out.println("000"+time);
        String T = "2021-06-16";
        SimpleDateFormat  sdf2 = new SimpleDateFormat("yyyy-MM-dd");
        Date parse = sdf2.parse(T);
        System.out.println(parse);



    }

    private static void Timemethod() {
        Date date01 = new Date(3600 * 1000 * 24L);
        System.out.println(date01);
        System.out.println(date01.getTime());
        long time = date01.getTime();
        System.out.println(time);
    }
}
